package lec08.am;

import java.util.TreeSet;

public class TreeSetDemo {
	public static void main(String[] args) {
		String[] words = "To know everything     is to? know nothing."
				.toLowerCase().split("\\W+");
		TreeSet<String> keywords = new TreeSet<String>();
		for (String word : words) {
			keywords.add(word);
		}
		//keywords.addAll(Arrays.asList(words));
		System.out.println(keywords);
	}
}
